<table width="100%" cellpadding="5" cellspacing="0" border="1" class="list item">
  <thead>
  <tr>
    <td class="first">Rubro</td>
    <td class="middle">Rubro relacionado</td>
    <td class="last">P&aacute;gina</td>
  </tr>
  </thead>
  <tbody>
<?php if($pager->getNbResults()!=0){ ?>
  <?php foreach($pager->getResults() as $row){ ?>
  <tr>
    <td width="450px" class="first"><?php echo $row->getNombreRubroBusqueda(); ?></td>
    <td width="450px" class="middle"><?php echo $row->getNombreRubroResultado(); ?></td>
    <td width="100px" class="last" align="center">
      <div style="display: block;">
          <div style="display: inline-block; width: 50px; vertical-align: middle;">
              <?php echo $row->getNumeroPagina(); ?>
          </div>
          <div style="display: inline-block; width: 40px; vertical-align: middle;">
              <a href="<?php echo url_for("@homepage?p=".$row->getNumeroPagina()); ?>">
                    <?php echo image_tag('btn_eye.png','size=22x16 title="Ir a la página"') ?></a>
          </div>
      </div>
    </td>
  </tr>
  <?php } ?>
<?php }else{ ?>
  <tr>
    <td class="middle" colspan="4">No existen registros</td>
  </tr>
<?php } ?>
  </tbody>
  <?php if ($pager->haveToPaginate()): ?>
  <tfoot>
  <tr>
    <td colspan="4" align="center">
      <div class="pagination">
        <?php if($pager->getFirstPage()!=$pager->getPage()){ ?>
            <a href="javascript:void(0)" onclick="ajaxPaginate('<?php echo $pager->getFirstPage() ?>')">Inicio</a>
        <?php } ?>
        <?php if($pager->getPreviousPage()!=$pager->getPage()){ ?>
            <a href="javascript:void(0)" onclick="ajaxPaginate('<?php echo $pager->getPreviousPage() ?>')">Anterior</a>
        <?php } ?>
        <?php foreach ($pager->getLinks() as $page): ?>
            <?php if ($page == $pager->getPage()): ?>
              <span class="actual_page">
                <?php echo $page ?>
              </span>
            <?php else: ?>
                <a href="javascript:void(0)" onclick="ajaxPaginate('<?php echo $page ?>')">
                    <?php echo $page ?></a>
            <?php endif; ?>
        <?php endforeach; ?>
        <?php if($pager->getNextPage()!=$pager->getPage()){ ?>
            <a href="javascript:void(0)" onclick="ajaxPaginate('<?php echo $pager->getNextPage() ?>')">Siguiente</a>
        <?php } ?>
        <?php if($pager->getLastPage()!=$pager->getPage()){ ?>
            <a href="javascript:void(0)" onclick="ajaxPaginate('<?php echo $pager->getLastPage() ?>')">Fin</a>
        <?php } ?>
      </div>
    </td>
  </tr>
  </tfoot>
  <?php endif; ?>
</table>